using System;
using System.Collections.Generic;
using System.ComponentModel;
using XCode;
using XCode.Configuration;
using XCode.DataAccessLayer;

namespace Model.Xcode
{
    /// <summary></summary>
    [Serializable]
    [DataObject]
    [BindTable("DingTalkTbiz_ErroUpdateEmployeeInfo", Description = "", ConnName = "DefaultDB", DbType = DatabaseType.SqlServer)]
    public partial class DingtalktbizErroupdateemployeeinfo : IDingtalktbizErroupdateemployeeinfo
    {
        #region 属性
        private Int32 _Id;
        /// <summary></summary>
        [DisplayName("Id")]
        [DataObjectField(true, true, false, 10)]
        [BindColumn("Id", "", "int")]
        public Int32 Id { get => _Id; set { if (OnPropertyChanging(__.Id, value)) { _Id = value; OnPropertyChanged(__.Id); } } }

        private String _UserId;
        /// <summary></summary>
        [DisplayName("UserId")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("UserId", "", "varchar(50)")]
        public String UserId { get => _UserId; set { if (OnPropertyChanging(__.UserId, value)) { _UserId = value; OnPropertyChanged(__.UserId); } } }

        private String _OldMobile;
        /// <summary></summary>
        [DisplayName("OldMobile")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("OldMobile", "", "varchar(50)")]
        public String OldMobile { get => _OldMobile; set { if (OnPropertyChanging(__.OldMobile, value)) { _OldMobile = value; OnPropertyChanged(__.OldMobile); } } }

        private String _NewMobile;
        /// <summary></summary>
        [DisplayName("NewMobile")]
        [DataObjectField(false, false, true, 50)]
        [BindColumn("NewMobile", "", "varchar(50)")]
        public String NewMobile { get => _NewMobile; set { if (OnPropertyChanging(__.NewMobile, value)) { _NewMobile = value; OnPropertyChanged(__.NewMobile); } } }

        private String _ErroCode;
        /// <summary></summary>
        [DisplayName("ErroCode")]
        [DataObjectField(false, false, true, 200)]
        [BindColumn("ErroCode", "", "varchar(200)")]
        public String ErroCode { get => _ErroCode; set { if (OnPropertyChanging(__.ErroCode, value)) { _ErroCode = value; OnPropertyChanged(__.ErroCode); } } }

        private DateTime _CreateDate;
        /// <summary></summary>
        [DisplayName("CreateDate")]
        [DataObjectField(false, false, true, 3)]
        [BindColumn("CreateDate", "", "datetime", Precision = 0, Scale = 3)]
        public DateTime CreateDate { get => _CreateDate; set { if (OnPropertyChanging(__.CreateDate, value)) { _CreateDate = value; OnPropertyChanged(__.CreateDate); } } }
        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        public override Object this[String name]
        {
            get
            {
                switch (name)
                {
                    case __.Id: return _Id;
                    case __.UserId: return _UserId;
                    case __.OldMobile: return _OldMobile;
                    case __.NewMobile: return _NewMobile;
                    case __.ErroCode: return _ErroCode;
                    case __.CreateDate: return _CreateDate;
                    default: return base[name];
                }
            }
            set
            {
                switch (name)
                {
                    case __.Id: _Id = value.ToInt(); break;
                    case __.UserId: _UserId = Convert.ToString(value); break;
                    case __.OldMobile: _OldMobile = Convert.ToString(value); break;
                    case __.NewMobile: _NewMobile = Convert.ToString(value); break;
                    case __.ErroCode: _ErroCode = Convert.ToString(value); break;
                    case __.CreateDate: _CreateDate = value.ToDateTime(); break;
                    default: base[name] = value; break;
                }
            }
        }
        #endregion

        #region 字段名
        /// <summary>取得DingtalktbizErroupdateemployeeinfo字段信息的快捷方式</summary>
        public partial class _
        {
            /// <summary></summary>
            public static readonly Field Id = FindByName(__.Id);

            /// <summary></summary>
            public static readonly Field UserId = FindByName(__.UserId);

            /// <summary></summary>
            public static readonly Field OldMobile = FindByName(__.OldMobile);

            /// <summary></summary>
            public static readonly Field NewMobile = FindByName(__.NewMobile);

            /// <summary></summary>
            public static readonly Field ErroCode = FindByName(__.ErroCode);

            /// <summary></summary>
            public static readonly Field CreateDate = FindByName(__.CreateDate);

            static Field FindByName(String name) => Meta.Table.FindByName(name);
        }

        /// <summary>取得DingtalktbizErroupdateemployeeinfo字段名称的快捷方式</summary>
        public partial class __
        {
            /// <summary></summary>
            public const String Id = "Id";

            /// <summary></summary>
            public const String UserId = "UserId";

            /// <summary></summary>
            public const String OldMobile = "OldMobile";

            /// <summary></summary>
            public const String NewMobile = "NewMobile";

            /// <summary></summary>
            public const String ErroCode = "ErroCode";

            /// <summary></summary>
            public const String CreateDate = "CreateDate";
        }
        #endregion
    }

    /// <summary>接口</summary>
    public partial interface IDingtalktbizErroupdateemployeeinfo
    {
        #region 属性
        /// <summary></summary>
        Int32 Id { get; set; }

        /// <summary></summary>
        String UserId { get; set; }

        /// <summary></summary>
        String OldMobile { get; set; }

        /// <summary></summary>
        String NewMobile { get; set; }

        /// <summary></summary>
        String ErroCode { get; set; }

        /// <summary></summary>
        DateTime CreateDate { get; set; }
        #endregion

        #region 获取/设置 字段值
        /// <summary>获取/设置 字段值</summary>
        /// <param name="name">字段名</param>
        /// <returns></returns>
        Object this[String name] { get; set; }
        #endregion
    }
}